//* dummy aliens that move only in ortogonal direction

function AlienShrapnel(ALeft,ATop) {
  // contructor
  var that = new Alien();
  that.images = null;
  that.color = 'rgba(255,255,255,1.0)';
  that.credit = 0;
  that.shrapnel = 0;
  that.x = ALeft;
  that.y = ATop;
  that.max_speed = 15;
  that.life = 1000;
  that.size = 5;
  
  // shrapnel move in random direction
  var angle = Math.random()*2*Math.PI;
  that.dx = that.max_speed*(Math.sin(angle));
  that.dy = that.max_speed*(Math.cos(angle));
  
  // update
  that.update = function() {
    // move
    this.x += this.dx;
    this.y += this.dy;
    // shrapnels are short lived
    if (this.frame >= 20)
      this.life = 0;
  }
 
  return that;
}

function AlienShrapnels(ACount,ALeft,ATop) {
  // create array of aliens
  var that = new Array();
  for (var i=0; i<ACount; i++)
      that.push(new AlienShrapnel(ALeft,ATop));
  return that;  
}
